package com.ejustcn.js;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;

import com.vaadin.annotations.VaadinServletConfiguration;
import com.vaadin.server.DeploymentConfiguration;
import com.vaadin.server.ServiceException;
import com.vaadin.server.VaadinServlet;
import com.vaadin.server.VaadinServletService;
import com.ejustcn.vaadinecharts.VaadinechartsUI;

@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = VaadinechartsUI.class)
public class StaticJsServlet extends VaadinServlet{

	/* (non-Javadoc)
	 * @see com.vaadin.server.VaadinServlet#servletInitialized()
	 */
	@Override
	protected void servletInitialized() throws ServletException {
		// TODO Auto-generated method stub
		super.servletInitialized();
	}

	/* (non-Javadoc)
	 * @see com.vaadin.server.VaadinServlet#createServletService(com.vaadin.server.DeploymentConfiguration)
	 */
	@Override
	protected VaadinServletService createServletService(
			DeploymentConfiguration deploymentConfiguration)
			throws ServiceException {
		VaadinServletService service = new StaticJsFileService(this,
				
				                deploymentConfiguration);
				
				        service.init();
				
				        return service;

	}

}
